import type { App } from "vue";
import moment from "moment";

export default {
  install: (app: App) => {
    // 将 moment 绑定到全局属性 $moment
    app.config.globalProperties.$moment = {
      formatDate(date: string, format: string) {
        return moment(date).format(format);
      },
    };
  },
};
